from mediator import mediator
from mediator . tests . test_assistant import make_mediator_test_keyword_args

class gui_fake :
    def __init__ ( self ) :
        self . _set_widget_font_weight_to_bold = [ ]
        self . _push_widget_font = [ ]
        self . _pop_widget_font = [ ]
    def gui_set_widget_font_weight_to_bold ( self , widget ) :
        self . _set_widget_font_weight_to_bold += [ widget ]
    def gui_push_widget_font ( self , widget ) :
        self . _push_widget_font += [ widget ]
    def gui_pop_widget_font ( self , widget ) :
        self . _pop_widget_font += [ widget ]

class mediator_gui_font_weight_tests : 
    'mediator_gui_font_weight_tests'
    def __init__ ( self , test ) :
        self . _test = test
        self . _gui = gui_fake ( )
        self . _mediator = mediator ( )
        self . _mediator . register_modules ( ** make_mediator_test_keyword_args \
            ( 'gui' 
            , self . _gui 
            , None
            ) )
    def test_gui_set_widget_font_weight_to_bold ( self ) :
        self . _mediator . gui_set_widget_font_weight_to_bold ( 'my widget' )
        self . _test . assume_equal ( self . _gui . _set_widget_font_weight_to_bold , [ 'my widget' ] )
    def test_gui_push_widget_font ( self ) :
        self . _mediator . gui_push_widget_font ( 'my widget' )
        self . _test . assume_equal ( self . _gui . _push_widget_font , [ 'my widget' ] )
    def test_gui_pop_widget_font ( self ) :
        self . _mediator . gui_pop_widget_font ( 'my widget' )
        self . _test . assume_equal ( self . _gui . _pop_widget_font , [ 'my widget' ] )
